package com.tenton.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Date: 2021/1/2
 * @Author: Tenton
 * @Description: Sales实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "销售对象", description = "")
public class Sales implements Serializable {
    @ApiModelProperty(value = "主键")
    private int id;
    @ApiModelProperty(value = "商品Id")
    private int comId;
    @ApiModelProperty(value = "商品名称")
    private String comName;
    @ApiModelProperty(value = "销售单价")
    private BigDecimal price;
    @ApiModelProperty(value = "销售数量")
    private int num;
    @ApiModelProperty(value = "商品销售总价")
    private Long total;
    @ApiModelProperty(value = "销售日期")
    private Date saleDate;
    @ApiModelProperty(value = "创建人姓名")
    private String createName;

    public Sales(int comId, String comName, BigDecimal price, int num, Long total) {
        this.comId = comId;
        this.comName = comName;
        this.price = price;
        this.num = num;
        this.total = total;
        this.saleDate = new Date();
    }
}